<admintpl file="headerEx"/>
<title>{:L('TABLE_MODEL_LISTS')}</title>
<!--responsive table-->
<link href="__PUBLIC__/TciocEx/css/table-responsive.css" rel="stylesheet"/>
<!--ios7-->
<link rel="stylesheet" type="text/css" href="__PUBLIC__/TciocEx/js/ios-switch/switchery.css" />

<!--icheck-->
<link href="__PUBLIC__/TciocEx/js/iCheck/skins/minimal/minimal.css" rel="stylesheet">
<link href="__PUBLIC__/TciocEx/js/iCheck/skins/minimal/red.css" rel="stylesheet">
<link href="__PUBLIC__/TciocEx/js/iCheck/skins/minimal/green.css" rel="stylesheet">
</head>
<body class="sticky-header">

<section>
    <!-- main content start-->
    <div class="full-content" >
        <!--body wrapper start-->
        <div class="wrapper">
            <div class="row">
                <div class="col-sm-12">
                    <section class="panel">
                        <header class="panel-heading custom-tab turquoise-tab">
                            <ul class="nav nav-tabs">
                                <li>
                                    <a  href="{:leuu('Admin/Model/index')}">
                                        <i class="fa fa-th-list"></i> {:L("TABLE_MODEL_LISTS")}
                                    </a>
                                </li>
                                <li>
                                    <a  href="{:leuu('Admin/ModelField/index',array('model_id'=>$_GET['model_id']))}">
                                        <i class="fa fa-bars"></i> 字段列表
                                    </a>
                                </li>
                                <li  class="active">
                                    <a  href="{:leuu('Admin/ModelField/add',array('model_id'=>$_GET['model_id']))}">
                                        <i class="fa fa-plus"></i> 添加字段
                                    </a>
                                </li>
                            </ul>
                        </header>
                        <div class="panel-body">
                            <section id="no-more-tables">
                                <form class="cmxform form-horizontal adminex-form" id="commentForm" method="post" action="{:U('Admin/ModelField/add')}" novalidate="novalidate">

                                    <div class="form-group ">
                                        <label for="cname" class="control-label col-lg-2 ">字段名(*)</label>
                                        <div class="col-lg-10">
                                            <input type="hidden" name="model_id" value="{$model_id}">
                                            <input class=" form-control" id="cname" name="name" minlength="1" type="text" placeholder="只能由英文字母、数字和下划线组成，并且仅能字母开头，不以下划线结尾，如：field_name" required="">
                                        </div>
                                    </div>
                                    <div class="form-group ">
                                        <label for="cemail" class="control-label col-lg-2">字段注释</label>
                                        <div class="col-lg-10">
                                            <input class="form-control " id="cemail" type="text"  placeholder="例如，“文章名称”" name="title" >
                                        </div>
                                    </div>
                                    <div class="form-group ">
                                        <label for="cemail" class="control-label col-lg-2">字段定义(*)</label>
                                        <div class="col-lg-10">
                                            <input class="form-control " id="cemail2" type="text" minlength="3" placeholder="字段定义(类型+长度):如 varchar(10)" name="field" required="">
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label for="clist_type" class="control-label col-lg-2">对应数据类型(*)</label>
                                        <div class="col-lg-10">
                                            <select name="type" id="clist_type" class="form-control">
                                                <option value="num">数字</option>
                                                <option value="string">文本框</option>
                                                <option value="textarea">文本区域</option>
                                                <option value="datetime">日期时间</option>
                                                <option value="select">下拉框</option>
                                                <option value="checkbox">选择</option>
                                                <option value="editor">编辑器</option>
                                                <option value="pictures">图片</option>
                                                <option value="files">附件</option>
                                            </select>
                                            <span>修改后将改变"字段定义"和"字段参数"!</span>
                                        </div>

                                    </div>
                                    <div class="form-group ">
                                        <label for="cemail" class="control-label col-lg-2">字段参数</label>
                                        <div class="col-lg-10">
                                            <input class="form-control " id="cemail3" type="text"  placeholder="字段参数，如：not null" name="extra" value="not null" >
                                        </div>
                                    </div>
                                    <div class="form-group ">
                                        <label for="cemail" class="control-label col-lg-2">字段默认值</label>
                                        <div class="col-lg-10">
                                            <input class="form-control " id="cemail4" type="text"  placeholder="字段默认值" name="value" >
                                        </div>
                                    </div>
                                    <div class="form-group ">
                                        <label for="cemail" class="control-label col-lg-2">备注</label>
                                        <div class="col-lg-10">
                                            <input class="form-control " id="cemail5" type="text"  placeholder="备注" name="remark">
                                        </div>
                                    </div>

                                    <div class="form-group">
                                        <div class="col-md-12 text-center clearfix">
                                            <button class="btn btn-primary" type="submit">保存</button>
                                            <a href="javascript:history.back(-1);" class="btn btn-default">返回</a>
                                        </div>
                                    </div>

                                </form>
                            </section>
                        </div>
                    </section>
                </div>
            </div>
        </div>

    </div>
    </div>
    </div>
    <!--body wrapper end-->

    <!--footer section start-->
    <footer>
        <admintpl file="copyright" />
    </footer>
    <!--footer section end-->
    </div>
    <!-- main content end-->
</section>

<script src="__PUBLIC__/TciocEx/js/jquery-1.10.2.min.js"></script>
<script src="__PUBLIC__/TciocEx/js/jquery-ui-1.9.2.custom.min.js"></script>
<script src="__PUBLIC__/TciocEx/js/jquery-migrate-1.2.1.min.js"></script>
<script src="__PUBLIC__/TciocEx/js/bootstrap.min.js"></script>
<script src="__PUBLIC__/TciocEx/js/modernizr.min.js"></script>
<script src="__PUBLIC__/TciocEx/js/jquery.nicescroll.js"></script>

<!--common scripts for all pages-->
<script src="__PUBLIC__/TciocEx/js/scripts.js"></script>

<!--ios7-->
<script src="__PUBLIC__/TciocEx/js/ios-switch/switchery.js" ></script>
<script src="__PUBLIC__/TciocEx/js/ios-switch/ios-init.js" ></script>

<!--icheck -->
<script src="__PUBLIC__/TciocEx/js/iCheck/jquery.icheck.js"></script>
<script src="__PUBLIC__/TciocEx/js/icheck-init.js"></script>
<!--common scripts for all pages-->

<script type="text/javascript" src="__PUBLIC__/TciocEx/js/jquery.validate.min.js"></script>
<script src="__PUBLIC__/TciocEx/js/validation-localization/messages_zh.min.js"></script>
<script src="__PUBLIC__/TciocEx/js/validation-init.js"></script>
<script src="__PUBLIC__/TciocEx/js/scripts.js"></script>

</body>
</html>